Exercise 10.2

For this exercise, the ResetDB stored procedure is modified by testing to see if each table exists before it is DROPped.  The required syntax is, for example,

IF OBJECT_ID('claim') IS NOT NULL DROP TABLE claim 

To view the code for the updated ResetDB procedure, use the Database Explorer, and expand the Stored Procedures node of the Database.mdf file.  You can then view the procedure, or execute it, by right clicking the mouse over the stored procedure's name.